home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 310_02 / primnum.h < prev    next >
C/C++ Source or Header  |  1990-04-18  |  4KB  |  174 lines

  1. /*
  2.     Little Smalltalk
  3.  
  4.     primitive names and numbers recognized by the parser
  5.  
  6. */
  7.  
  8. static struct prim_names {
  9.     char *p_name;
  10.     int p_number;
  11.     } prim_table[] = {
  12.  
  13.     /* Operations on all objects */
  14. { "Class" , 1 },
  15. { "SuperObject", 2 },
  16. { "RespondsToNew", 3 },
  17. { "Size", 4 },
  18. { "HashNumber", 5},
  19. { "SameTypeOfObject", 6},
  20. { "Equality", 7},
  21. { "Debug", 8},
  22. { "GeneralityTest", 9},
  23.     /* Integer Arithmetic Operations */
  24. { "IntegerAddition" , 10 },
  25. { "IntegerSubtraction", 11 },
  26. { "IntegerLessThan", 12 },
  27. { "IntegerGreaterThan", 13 },
  28. { "IntegerLessThanOrEqual", 14 },
  29. { "IntegerGreaterThanOrEqual", 15 },
  30. { "IntegerEquality", 16 },
  31. { "IntegerNonEquality", 17 },
  32. { "IntegerMultiplication", 18 },
  33. { "IntegerSlash", 19 },
  34. { "GCD", 20 },
  35. { "BitAt", 21 },
  36. { "BitOR", 22 },
  37. { "BitAND", 23 },
  38. { "BitXOR", 24 },
  39. { "BitShift", 25 },
  40. { "RadixPrint", 26 },
  41. { "IntegerDivision", 28 },
  42. { "IntegerMod", 29 },
  43. { "DoPrimitive", 30 },
  44. { "RandomFloat", 32 },
  45. { "BitInverse", 33 },
  46. { "HighBit", 34 },
  47. { "Random", 35 },
  48. { "IntegerToCharacter", 36 },
  49. { "IntegerToString", 37 },
  50. { "Factorial", 38 },
  51. { "IntegerToFloat", 39 },
  52.     /* Character Operations */
  53. { "CharacterLessThan", 42 },
  54. { "CharacterGreaterThan", 43 },
  55. { "CharacterLessThanOrEqual", 44 },
  56. { "CharacterGreaterThanOrEqual", 45 },
  57. { "CharacterEquality", 46 },
  58. { "CharacterNonEquality", 47 },
  59. { "DigitValue", 50 },
  60. { "IsVowel", 51 },
  61. { "IsAlpha", 52 },
  62. { "IsLower", 53 },
  63. { "IsUpper", 54 },
  64. { "IsSpace", 55 },
  65. { "IsAlnum", 56 },
  66. { "ChangeCase", 57 },
  67. { "CharacterToString", 58 },
  68. { "CharacterToInteger", 59 },
  69.     /* floating point operations */
  70. { "FloatAddition", 60 },
  71. { "FloatSubtraction", 61 },
  72. { "FloatLessThan", 62 },
  73. { "FloatGreaterThan", 63 },
  74. { "FloatLessThanOrEqual", 64 },
  75. { "FloatGreaterThanOrEqual", 65 },
  76. { "FloatEquality", 66 },
  77. { "FloatNonEquality", 67 },
  78. { "FloatMultiplication", 68 },
  79. { "FloatDivision", 69 },
  80. { "Log", 70 },
  81. { "SquareRoot", 71 },
  82. { "Floor", 72 },
  83. { "Ceiling", 73 },
  84. { "IntegerPart", 75 },
  85. { "FractionalPart", 76 },
  86. { "Gamma", 77 },
  87. { "FloatToString", 78},
  88. { "Exponent", 79},
  89. { "NormalizeRadian", 80},
  90. { "Sin", 81},
  91. { "Cos", 82},
  92. { "ArcSin", 84},
  93. { "ArcCos", 85},
  94. { "ArcTan", 86},
  95. { "Power", 88},
  96. { "FloatRadixPrint", 89},
  97.     /* symbol operations */
  98. { "SymbolCompare", 91},
  99. { "SymbolPrintString", 92},
  100. { "SymbolAsString", 93},
  101. { "SymbolPrint", 94},
  102. { "NewClass", 97 },
  103. { "InstallClass", 98},
  104. { "FindClass", 99},
  105.     /* string operations */
  106. { "StringLength", 100},
  107. { "StringCompare", 101},
  108. { "StringCompareWithoutCase", 102},
  109. { "StringCatenation", 103},
  110. { "StringAt", 104},
  111. { "StringAtPut", 105},
  112. { "CopyFromLength", 106},
  113. { "StringCopy", 107},
  114. { "StringAsSymbol", 108},
  115. { "StringPrintString", 109},
  116.     /* arrays and other objects */
  117. { "NewObject", 110},
  118. { "At", 111},
  119. { "AtPut", 112},
  120. { "Grow", 113},
  121. { "NewArray", 114},
  122. { "NewString", 115},
  123. { "NewByteArray", 116},
  124. { "ByteArraySize", 117},
  125. { "ByteArrayAt", 118},
  126. { "ByteArrayAtPut", 119},
  127.     /* I/O operations */
  128. { "PrintNoReturn", 120},
  129. { "PrintWithReturn", 121},
  130. { "Error", 122},
  131. { "ErrorPrint", 123},
  132. { "System", 125},
  133. { "PrintAt", 126},
  134. { "BlockReturn", 127},
  135. { "ReferenceError", 128},
  136. { "DoesNotRespond", 129},
  137.     /* operations on files */
  138. { "FileOpen", 130},
  139. { "FileRead", 131},
  140. { "FileWrite", 132},
  141. { "FileSetMode", 133},
  142. { "FileSize", 134},
  143. { "FileSetPosition", 135},
  144. { "FileFindPosition", 136},
  145.     /* Process management */
  146. { "BlockExecute", 140},
  147. { "NewProcess", 141},
  148. { "Terminate", 142},
  149. { "Perform", 143},
  150. { "SetProcessState", 145},
  151. { "ReturnProcessState", 146},
  152. { "StartAtomic", 148},
  153. { "EndAtomic", 149},
  154.     /* operations on classes */
  155. { "ClassEdit", 150},
  156. { "SuperClass", 151},
  157. { "ClassName", 152},
  158. { "ClassNew", 153},
  159. { "PrintMessages", 154},
  160. { "RespondsTo", 155},
  161. { "ClassView", 156},
  162. { "ClassList", 157},
  163. { "Variables", 158},
  164.     /* misc operations */
  165. { "CurrentTime", 160},
  166. { "TimeCounter", 161},
  167. { "Clear", 162},
  168. { "GetString", 163},
  169. { "StringAsInteger", 164},
  170. { "StringAsFloat", 165},
  171.     /* that's all */
  172. { 0 , 0 } };
  173.  
  174.